/* 基础样式 */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --text-color: #333;
    --light-text: #7f8c8d;
    --bg-color: #f9f9f9;
    --white: #ffffff;
    --border-color: #e0e0e0;
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif SC', serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

/* 头部样式 */
.site-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.site-description {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}

/* 导航样式 */
.main-nav {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 15px 0;
}

.nav-list li {
    margin: 0 15px;
}

.nav-list a {
    color: var(--secondary-color);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.nav-list a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

.nav-list a:hover:after {
    width: 100%;
}

/* 主要内容样式 */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.post-card {
    background: var(--white);
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.post-meta {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: var(--light-text);
    font-size: 0.9rem;
}

.post-meta time {
    margin-right: 15px;
}

.post-category {
    background: var(--accent-color);
    color: var(--white);
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.post-title a {
    color: var(--primary-color);
}

.post-excerpt {
    margin-bottom: 20px;
    color: var(--text-color);
}

.read-more {
    display: inline-block;
    font-weight: 500;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 2px;
}

/* 侧边栏样式 */
.sidebar {
    background: var(--white);
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.widget {
    margin-bottom: 30px;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 8px;
}

.category-list a {
    display: block;
    padding: 5px 0;
    color: var(--text-color);
}

.category-list a:hover {
    color: var(--accent-color);
    padding-left: 5px;
    transition: all 0.3s ease;
}

.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subscribe-form input {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-family: inherit;
}

.subscribe-form button {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.subscribe-form button:hover {
    background: var(--primary-color);
}

/* 页脚样式 */
.site-footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
}

.site-footer p {
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links a {
    color: var(--white);
    opacity: 0.8;
}

.social-links a:hover {
    opacity: 1;
}

/* 响应式设计 */
@media (min-width: 768px) {
    .main-content {
        display: grid;
        grid-template-columns:1fr 3fr 1fr;
        gap: 40px;
    }
    .main-content .container{
        grid-column-start: 2;
    }
    /* .main-left-content
    {
        display: grid;
        grid-template-columns:1fr;
        gap: 40px;
    } */

    /* .sidebar {
        display:flex;
        margin-bottom: 0;
        gap: 200px;
        justify-content: center;
        align-self: start;
        position: sticky;
        top: 20px;
    } */
        .sidebar {
        display:grid;
        margin-bottom: 0;
        grid-template-columns:1fr 3fr 1fr;
        justify-content: center;
        align-self: start;
        position: sticky;
        top: 20px;
    }
    .sidebar .container{
        grid-column-start: 2;
    }
}